class MyThread implements Runnable {
    public MyThread() {
    }
    public void run() {
        for (int i = 1; i <= 20; i++) {
            System.out.println(i+"  "+Thread.currentThread().getName());
            try {
                Thread.sleep(200);//睡眠500ms给其它线程运行机会
            }
            catch (InterruptedException ignored) {
            }
        }
    }
    public static void main(String[] args) {
        Thread t1 = new Thread(new MyThread(),"1900301538");
        // 创建线程1的对象
        Thread t2 = new Thread(new MyThread(),"赵海宇");
        // 创建线程2的对象
        t1.start(); //启动两个线程运行
        t2.start(); //虽然t2的启动表面上好像在后面,实际上两个线程的执行并无先后之分,
//t2的执行甚至有可能在t1之前,看系统的调度情况,
    }
}           //1900301538
            //赵海宇


